extends "../calxJS_Hide/calxJS_Hide.gd"
func _init():
	pass
func _extInit():
	._extInit()
	chaName = "小百川"                   # 角色的名称
	attCoe.atkRan = 2                 # 攻击距离
	attCoe.maxHp = 5.5                  # 最大生命（每点代表112.5基础数值，取整数，下同）
	attCoe.atk = 7                    # 攻击力（每点代表8.5）
	attCoe.mgiAtk = 2                 # 魔法攻击（每点代表13.7）
	attCoe.def = 4                    # 物理防御（每点代表15）
	attCoe.mgiDef = 4                 # 魔法防御（每点代表16.6）
	atkEff = "atk_dang" 
	xb = "水"
	lv = 3    
	addSkillTxt("[川流不息]挥出水流攻击目标单体4次，每次造成60%物攻的水系物理伤害，每次恢复随机友军伤害值的30%体力[CD:10]")
	addSkillTxt("[海源复原]召唤海源的祝福，恢复自身30%已损失体力值，提升自身闪避10%，至高60%[CD:12]")
	addSkillTxt("[鱼灵潮汐]指挥鱼灵攻击目标单体，造成135%水系物理伤害，之后降低目标伤害20%，持续5秒[CD:5]")
	addCdSkill("clbx",10)
	addCdSkill("yhfy",12)
	addCdSkill("ylcx",5)

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "clbx":
		var eff = sys.newEff("numHit", position, false, 1)
		eff.setText("川流不息", "#FF0099")
		eff.anim.set_speed_scale(0.2)
		var chas=getAllChas(2)
		var cha=sys.rndListItem(chas)
		for i in range(4):
			typeHurtCha(aiCha,att.atk*0.6,Chara.HurtType.PHY,Chara.AtkType.SKILL)
			cha.plusHp(atkInfo.hurtVal*0.3)
	if id == "hyfy":
		plusHp((att.maxHp - att.hp)*0.3)
		var bf1 = hasBuff("shanbi1")
		if bf1 == null:
			addBuff(bf.shanbi1.new())
		elif bf1.att.dod < 0.6:
			bf1.att.dod += 0.1
	if id == "ylcx":
		var eff = sys.newEff("numHit", position, false, 1)
		eff.setText("鱼灵潮汐", "#FF0099")
		eff.anim.set_speed_scale(0.2)
		typeHurtCha(aiCha,att.atk*1.35,Chara.HurtType.PHY,Chara.AtkType.SKILL)
		aiCha.addBuff(caoxi.new(5))

class caoxi:
	extends Buff
	var dispelable = false
	func _init(lv = 1):
		attInit()
		id = "caoxi"
		life = lv
		isNegetive=true
		att.atkR -= 0.2